﻿<!DOCTYPE html>
<!--作业基本信息配置列表-->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <script src="../../static/js/Mock/JobLicenseApp.js"></script>
    <script src="../../static/js/Resource/JobLicenseApp.js"></script>
    <style type="text/css">
        .floatDiv {
            position: fixed;
            top: 10%;
            left: 1px;
            border: 1px solid #ccc;
            background: #EBEEF5;
            cursor: pointer;
            width: 14px;
            font-size: 14px;
            padding: 10px;
            z-index: 999;
        }

        table {
            width: 100%;
            border-top: 1px solid;
            border-left: 1px solid;
            text-align: center;
            /*border-right: none;*/
        }

            table td {
                border-right: 1px solid;
                border-bottom: 1px solid;
                height: 40px;
                /*height:38px;*/
            }
    </style>
</head>
<body>
    
<div id="app" v-cloak>   
        <div @click="DialogInput" class="floatDiv">
            相关表格
        </div>
        <div style="width:100%;text-align:center ">
            <label style="font-weight:bold">一般吊装作业安全许可证</label>
        </div>
        <div style="width:100%;text-align:right" class="toptitle">
            <label>2018-09-09</label>
            <label>Q/G11-018-R01</label>
            <label>No.：{{Form.ApplicationNumber}}</label>
        </div>
        <el-form :model="Form" status-icon style="margin-top:5px;width:100%">
            <table cellpadding="0" cellspacing="0">
                <!--第一行-->
                <tr>
                    <!--工作内容-->
                    <td width="10%" rowspan="7" style="text-align:center; ">工作内容</td>
                    <!--作业单位-->
                    <td width="15%">
                        <div>{{SimpleLiftingOperation.OperatingUnit}}</div>
                    </td>
                    <!--作业单位值-->
                    <td width="15%">
                        <label>{{Form.OperatingUnit}}</label>
                    </td>
                    <!--属地部门:-->
                    <td width="15%">
                        <div>{{GeneralLiftingWorkSafety.TerritorialDepartment}}</div>
                    </td>
                    <!--属地部门值-->
                    <td width="15%">
                        {{Form.TerritorialDepartment}}
                    </td>
                    <!--吊装人员及特殊工种作业证号-->
                    <td width="15%">
                        {{GeneralLiftingWorkSafety.HoistingPersonnel}}
                    </td>
                    <!--吊装人员及特殊工种作业证号值-->
                    <td width="15%">
                        {{Form.HoistingPersonnel}}
                    </td>
                </tr>
                <!--第二行-->
                <tr>
                    <!--作业地点-->
                    <td width="15%" height="40px">
                        <div> {{GeneralLiftingWorkSafety.JobLocation}}</div>
                    </td>
                    <!--作业地点值-->
                    <td width="15%">
                        <label>{{Form.JobLocation}}</label>
                    </td>
                    <!--级别:-->
                    <td width="15%">
                        <div>{{GeneralLiftingWorkSafety.Level}}</div>
                    </td>
                    <!--级别值-->
                    <td width="15%">
                        {{Form.Level}}
                    </td>
                    <!--吊装指挥人及特殊工种作业证号-->
                    <td width="15%">
                        {{GeneralLiftingWorkSafety.HoistingCommander}}
                    </td>
                    <!--吊装指挥人及特殊工种作业证号值-->
                    <td width="15%">
                        {{Form.HoistingCommander}}
                    </td>
                </tr>
                <!--第三行-->
                <tr>
                    <td colspan="6" width="15%" height="40px" style="text-align:left;padding-left:10px;">
                        {{GeneralLiftingWorkSafety.LiftingContentDescription+mark.m}}
                        {{Form.LiftingContentDescription}}
                    </td>
                </tr>
                <!--第四行-->
                <tr>
                    <!--起重机额定载荷(吨):-->
                    <td colspan="3" width="15%" height="40px">
                        {{GeneralLiftingWorkSafety.CraneRatedLoad+mark.m}}{{Form.CraneRatedLoad}}
                    </td>
                    <!--被吊物最大重量(吨):-->
                    <td colspan="3" width="15%" height="40px">
                        {{GeneralLiftingWorkSafety.MaximumWeightObject+mark.m}}{{Form.MaximumWeightObject}}
                    </td>
                </tr>
                <!--第五行-->
                <tr>
                    <!--是否已制定吊装作业安全方案-->
                    <td colspan="4" width="15%" height="40px">
                        {{GeneralLiftingWorkSafety.IsDevelopSafetyPlan+mark.m}}
                        <el-radio-group v-model="Form.IsDevelopSafetyPlan" style="margin-top:3px;margin-left:100px;">
                            <el-radio v-for="item in IsDevelopSafetyPlan" :label="item.value" :value="item.key">{{item.value}}</el-radio>
                        </el-radio-group>
                    </td>
                    <!--吊装工具名称-->
                    <td colspan="2" width="15%" height="40px">
                        {{GeneralLiftingWorkSafety.LiftingToolName+mark.m}}{{Form.LiftingToolName}}
                    </td>
                </tr>
                <!--第六行-->
                <tr>
                    <td colspan="6" width="15%" height="40px">
                        {{GeneralLiftingWorkSafety.InvolvingOtherSpecialOperations+mark.m}}{{Form.InvolvingOtherSpecialOperations}}
                    </td>
                </tr>
                <!--第七行-->
                <tr>
                    <td colspan="6" width="15%" height="40px" style="padding-left:20px;">
                        <el-checkbox v-model="checked">{{GeneralLiftingWorkSafety.contractor+mark.m}}</el-checkbox>
                        {{Form.contractor}}
                    </td>
                </tr>
            </table>
            <table cellpadding="0" cellspacing="0" style="border-top:0;">
                <tr>
                    <td>{{GeneralLiftingWorkSafety.HazardIdentification}}</td>
                    <td colspan="3"></td>

                </tr>
                <tr>
                    <td width="10%">序号</td>
                    <td width="50%">{{GeneralLiftingWorkSafety.SafetyMeasures}}</td>
                    <td width="20%">{{JobGeneralLiftingWorkDetailed.ImplementationSituation}}</td>
                    <td width="20%">{{JobGeneralLiftingWorkDetailed.ConfirmerSign}}</td>
                </tr>
                <tr v-for="(v,i) in Form.HazardIdentification">
                    <td>{{i+1}}</td>
                    <td style="text-align:left;padding-left:10px;">{{v.SafetyMeasures}}</td>
                    <td>{{v.ImplementationSituation}}</td>
                    <td>    <signature v-model="value" :disabled="false"></signature></td>
                </tr>
            </table>
            <!--基于数据库管控要求begin-->
            <!--<table cellpadding="0" cellspacing="0" style="border-top:0;">
                <tr>
                    <td colspan="4" style="text-align:left;padding-left:10px;">{{GeneralLiftingWorkSafety.BasedDatabaseManagementRequirements}}</td>

                </tr>
                <tr>
                    <td width="10%">序号</td>
                    <td width="50%">{{JobGeneralLiftingWorkDetailed.ControlAsk}}</td>
                    <td width="20%">{{JobGeneralLiftingWorkDetailed.ImplementationSituation}}</td>
                    <td width="20%">{{JobGeneralLiftingWorkDetailed.ConfirmerSign}}</td>
                </tr>
                <tr v-for="(v,i) in Form.BaseDataBaseControlAsk">
                    <td>{{i+1}}</td>
                    <td style="text-align:left;padding-left:10px;">{{v.ControlAsk}}</td>
                    <td>{{v.ImplementationSituation}}</td>
                    <td>    <signature v-model="value" :disabled="false"></signature></td>
                </tr>
            </table>-->
            <!--基于数据库管控要求end-->
            <!--许可证的签批-->
            <table cellpadding="0" cellspacing="0" style="border-top:0;">
                <tr>
                    <td width="10%" rowspan="4">许可证的签批</td>
                    <td width="45%" style="text-align:left;padding:10px;">{{JobGeneralLiftingWorkDetailed.LicenceApprovalPromise1}}</td>
                    <td width="45%" style="text-align:left;padding:10px;">
                        {{JobGeneralLiftingWorkDetailed.HomeworkLeader+mark.m}}
                        <!--签名-->
                        <signature v-model="SignValue" :disabled="false"></signature>
                        <!--系统时间-->
                        {{SystemDateTime}}
                    </td>
                </tr>
                <tr>
                    <td rowspan="2" style="text-align:left;padding:10px;">{{JobGeneralLiftingWorkDetailed.LicenceApprovalPromise2}}</td>
                    <td style="text-align:left;padding:10px;">
                        <!--吊装负责人-->
                        {{JobGeneralLiftingWorkDetailed.HoistingLeader+mark.m}}
                        <signature v-model="SignValue" :disabled="false"></signature>
                        <!--系统时间-->
                        {{SystemDateTime}}
                        <signature v-model="SignValue" :disabled="false"></signature>
                        <!--系统时间-->
                        {{SystemDateTime}}
                    </td>
                </tr>
                <tr>
                    <td style="text-align:left;padding:10px;">监护人： <signature v-model="value" :disabled="false"></signature></td>
                </tr>




                <tr>
                    <td style="text-align:left;padding:10px;"> {{JobGeneralLiftingWorkDetailed.LicenceApprovalPromise3}}</td>
                    <td style="text-align:left;padding:10px;"> {{JobGeneralLiftingWorkDetailed.Approver+mark.m}} <signature v-model="value" :disabled="false"></signature></td>
                </tr>
                <tr>
                    <td colspan="3" style="text-align:left;padding:10px;">
                        {{JobGeneralLiftingWorkDetailed.LicenceApprovalPromise4}}<br />
                        {{JobGeneralLiftingWorkDetailed.HomeworkLeader+mark.m}} <signature v-model="value" :disabled="false"></signature>
                    </td>
                </tr>
            </table>




            <!--底部按钮-->
            <el-row type="flex" justify="end">
                <el-form-item>
                    <!--提交-->
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSubmit}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
        <el-dialog :title="DialogTitle" fullscreen="true" :visible.sync="ListItem.dialogVisible" width="80%" height="80%" top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        app = new Vue({
            el: '#app',
            data: {
                id: '',
                DialogTitle: '相关表格',
                Form: {
                    id: guidEmpty,
                    OperatingUnit: '',//作业单位
                    ApplicationNumber: '',//申请编号
                    ApplicationTime: '',//申请时间
                    OperatingName: '',//"作业名称",
                    JobManagere: '',//作业负责人
                    JobLocation: '',//作业地点
                    JobStartTime: '',//作业起始时间
                    JobEndTime: '',//有效截至时间
                    TerritorialDepartment: '',//属地部门
                    CurrentJob: '',//当前作业
                    Level: '',//等级
                    HoistingPersonnel: '',//吊装人员及特殊工种作业证号
                    HoistingCommander: '',//吊装指挥人及特殊工种作业证号
                    LiftingContentDescription: '',//LiftingContentDescription
                    CraneRatedLoad: '',//起重机额定载荷
                    MaximumWeightObject: '',//被吊物最大重量
                    IsDevelopSafetyPlan: '',//是否已制定吊装作业安全方案
                    LiftingToolName: '',//吊装工具名称
                    InvolvingOtherSpecialOperations: '',//涉及其他特殊作业
                    contractor: '',//承包商
                    HazardIdentification: '',//危害辨识
                    BasedDatabaseManagementRequirements: '',//基于数据库管控要求
                    Approver: '',//审批人
                    LiftingOperator: '',//吊装作业人
                    HoistingGuardian: '',//吊装监护人
                    RelatedForm: '',//相关表格
                },
                value: '',
                SignValue: '/static/images/signature.png',
                TerritorialDepartment: [],
                Level: [],
                IsDevelopSafetyPlan: [],
                contractor: [],
                Confirmor: [],
                rules: {},
                OperatingUnit: [],
                BasedDatabaseManagementRequirements: [],
                ListItem: ListItem,
                SystemDateTime: '',
                checked: true,
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                DialogInput: function () {
                    //this.DialogTitle = "防护措施设置";
                    DialogShow(this, 'tj', "GeneralLiftingWorkDetailedTable.html", this.id);
                },
                handleNodeClick: function (data) {
                    console.log(data);
                },
                handleSelect: function (ev) {
                    console.log(ev);
                },
                handleChecked: function (value) {
                },
                handleCheckedConfirmation: function (value) {
                },
                getData: function () {
                    console.log(this.id)
                    //getDataAdd(this, '/api/GeneralLiftingWorkDetailed/get?id=' + this.id);
                    var mythis = this;
                    myAjax("get", mythis, '/api/GeneralLiftingWorkDetailed/get?id=' + mythis.id, null, function (response) {
                        console.log('response', response)
                        var ajaxModel = response.data;
                        mythis.Form = ajaxModel;
                    }, false);
                    console.log(this.Form)
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    console.log(mythis)
                    onSubmitForm(this, '/api/GeneralLiftingWorkSafety/Save', mythis.Form);
                },

            },
            mounted: function () {
                var date = new Date();
                //数据
                var list = getDicDataArray(['14', '03', '50', '12', '09', '08']);
                //作业单位
                this.OperatingUnit = getDicDatafromArray('08', list);
                //属地部门
                this.TerritorialDepartment = getDicDatafromArray('14', list);
                //等级
                this.Level = getDicDatafromArray('03', list);
                //是否选择
                this.IsDevelopSafetyPlan = getDicDatafromArray('50', list);
                //承包商
                this.contractor = getDicDatafromArray('12', list);
                //批准人
                this.Confirmor = getDicDatafromArray("09", list);
                //获取id
                this.id = getUrlParam("id");
                this.getData();
                this.SystemDateTime = date.getFullYear() + "年" + date.getMonth() + "月" + date.getDay() + "日" + date.getHours() + "时" + date.getMinutes() + "分";
                this.Form.OperatingUnit = "工作单位xxxxx";
                this.Form.TerritorialDepartment = "属地部门xxxxxxxx";
                this.Form.HoistingPersonnel = "吊装人员及特殊工种作业证号xxxxxx";    
                this.Form.JobLocation = "作业地点xxxx";
                this.Form.Level = "级别xxx";
                this.Form.HoistingCommander = "吊装指挥人及特殊工种作业证号x";
                this.Form.LiftingContentDescription = "吊装内容描述xxxx";
                this.Form.CraneRatedLoad = "起重机额定载荷(吨)xx";
                this.Form.MaximumWeightObject = "被吊物最大重量(吨)xx";
                this.Form.LiftingToolName = "吊装工具名称xxxxxxxx";
                this.Form.InvolvingOtherSpecialOperations = "涉及其他特殊作业xxxxxxxxxx";
                this.Form.HazardIdentification = HazardIdentificationA();
                //控制要求数据
                this.Form.BaseDataBaseControlAsk = ControlAsk();
            }
        });


        //遍历安全措施数据
        function HazardIdentificationA() {
            var HazardIdentificationList = [];
            for (var i = 0; i < 16; i++) {
                var HazardIdentification = {};
                //var BaseDataBaseControlAsk = {};
                HazardIdentification.SafetyMeasures = getDicValue("92", i);
                HazardIdentification.ImplementationSituation = randomValue('ls1');
                //BaseDataBaseControlAsk.ImplementationSituation = randomValue('ls1');
                HazardIdentificationList.push(HazardIdentification);

            }
            return HazardIdentificationList;
        }
        //遍历控制要求数据
        function ControlAsk() {
            var ControlAskList = [];
            for (var i = 0; i < 2; i++) {
                var BaseDataBaseControlAsk = {};
                BaseDataBaseControlAsk.ControlAsk = getDicValue("kz1", i);
                console.log(BaseDataBaseControlAsk.ControlAsk);
                ControlAskList.push(BaseDataBaseControlAsk);
            }
            return ControlAskList;
        }
    </script>
</body>
</html>